<?php
//鹅适配器，叫起来像鸭子
class EAdaptObserve implements DuckInterface, QuickObservable{
    protected $e;
    protected $observe;
    public function __construct(E $e)
    {
        $this->e = $e;
        $this->observe = new Observable($this);
    }

    public function quick()
    {
        $this->e->hook();
        $this->notify();
    }
    public function notify()
    {
       $this->observe->notify();
    }
    public function register(Observe $ob)
    {
        $this->observe->register($ob);
    }
    public function getName()
    {
        return $this->e->getName();
    }
}